/*******************************************************************************
 * Package: inst
 * Type:    InstanceofMain
 * Date:    2024-10-15 10:44
 *
 * Copyright (c) 2024 LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package inst;

import java.util.Objects;

/**
 * 功能描述：
 *instanceof 语句得到了增强，不再需要显式进行类型转换。
 * @author Songxianyang
 * @date 2024-10-15 10:44
 */
public class InstanceofMain {
    public static void main(String[] args) {
        Object obj = "song";
        if (obj instanceof String) {
            System.out.println("String-toUpperCase"+((String) obj).toUpperCase());
        }
    }
}
